package main

import (
	"fmt"
	"github.com/spf13/cobra"
	sys_contant "go-iot-gateway/internal/sys/contant"
	"time"
)

var versionCmd = &cobra.Command{
	Use:   "version",
	Short: "查看当前版本号",
	Long:  `查看当前版本号`,
	Run: func(cmd *cobra.Command, args []string) {
		//todo
		fmt.Printf("version   : %s\n", sys_contant.APP_VERSION)
		fmt.Printf("go_version: %s\n", sys_contant.GO_VERSION)
		fmt.Println("current_time: ", time.Now().Format("2006-01-02 15:04:05"))
		//fmt.Printf("GIT_COMMIT: %s\n", "start.GIT_VERSION")
		//fmt.Printf("BUILD_TIME: %s\n", "start.BUILD_TIME")
	},
}
